Skip to content

Comments

test(e2e): add strict port coverage#6592

Merged
chenjiahan merged 7 commits intomainfrom
codex/add-e2e-test-case-for-rsbuild-configuration-sxi22v
Nov 17, 2025
Merged

test(e2e): add strict port coverage#6592
chenjiahan merged 7 commits intomainfrom
codex/add-e2e-test-case-for-rsbuild-configuration-sxi22v

Conversation

@chenjiahan
Copy link
Member

Summary

  • replace the previous dev client configuration scenario with a strict-port server fixture
  • verify dev startup fails with server.strictPort when the requested port is already occupied

Testing

  • pnpm lint

Codex Task

Copilot AI review requested due to automatic review settings November 16, 2025 08:27
@netlify
Copy link

netlify bot commented Nov 16, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit ee1069d
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/6919d0d7e9183f0008d3ab9e
😎 Deploy Preview https://deploy-preview-6592--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 62 (🔴 down 8 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds end-to-end test coverage for the server.strictPort configuration option, which controls whether the dev server should throw an error when the requested port is already in use.

  • Adds a new e2e test case to verify that dev server startup fails when strictPort is enabled and the port is occupied
  • Creates a helper function to programmatically occupy a port for testing purposes
  • Implements proper resource cleanup to ensure the blocking server is closed after the test

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
e2e/cases/server/strict-port/index.test.ts Main test file that verifies strictPort behavior by occupying a port and expecting dev server to throw an error
e2e/cases/server/strict-port/rsbuild.config.ts Basic Rsbuild configuration for the test fixture
e2e/cases/server/strict-port/src/index.ts Minimal source file for the test fixture

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chenjiahan chenjiahan merged commit be0f169 into main Nov 17, 2025
11 checks passed
@chenjiahan chenjiahan deleted the codex/add-e2e-test-case-for-rsbuild-configuration-sxi22v branch November 17, 2025 05:50
@chenjiahan chenjiahan mentioned this pull request Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant